package com.example.synccenter.event;

import lombok.RequiredArgsConstructor;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;

/**
 * 身份源事件发布器
 */
@Component
@RequiredArgsConstructor
public class IdentitySourceEventPublisher {
    
    private final ApplicationEventPublisher eventPublisher;

    /**
     * 发布配置变更事件
     */
    public void publishConfigEvent(String id, String type, IdentitySourceConfigEvent.EventType eventType) {
        eventPublisher.publishEvent(new IdentitySourceConfigEvent(id, type, eventType));
    }
} 